package com.example.meetingbook.mapper;

import com.example.meetingbook.dto.MeetingDTO;
import com.example.meetingbook.model.Meeting;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 麦健豪
 * @date 2021/12/23 18:05
 */
public interface MeetingMapper {
    Integer addMeeting(Meeting meeting);

    void addParticipants(@Param("meetingid") Integer meetingid, @Param("mps") Integer[] mps);


    List<MeetingDTO> listMeetingDTOs(@Param("mdto") MeetingDTO meetingDTO, @Param("page") Integer page,
                                     @Param("pagesize") Integer pagesize);

    Long getTotal(@Param("mdto") MeetingDTO meetingDTO);


    List<Meeting> getMeetingById(Integer employeeid);

    List<Meeting> getCancelMeeting();

    Meeting getmeetingByid(Integer meetingid);

    List<MeetingDTO> getmeetingofmybook(Integer employeeid);

    void cancelmeeting(Integer meetingid, String canceledreason);
}